package com.sjgs.gis.service.mapper;


import com.sjgs.gis.domain.*;
import com.sjgs.gis.service.dto.JdbcClusterDTO;

import org.mapstruct.*;

/**
 * Mapper for the entity {@link JdbcCluster} and its DTO {@link JdbcClusterDTO}.
 */
@Mapper(componentModel = "spring", uses = {})
public interface JdbcClusterMapper extends EntityMapper<JdbcClusterDTO, JdbcCluster> {


    @Mapping(target = "nodes", ignore = true)
    @Mapping(target = "removeNode", ignore = true)
    JdbcCluster toEntity(JdbcClusterDTO jdbcClusterDTO);

    default JdbcCluster fromId(Long id) {
        if (id == null) {
            return null;
        }
        JdbcCluster jdbcCluster = new JdbcCluster();
        jdbcCluster.setId(id);
        return jdbcCluster;
    }
}
